BaseRefreshableTab   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 2

2 Functions

Rating   Name   Duplication   Size   Complexity  
A refresh 0 4 1
A setSubState 0 4 1
1
import React from 'react';
2
3
// TODO showLoading도 여기서 관리하도록 변경
4
export default class BaseRefreshableTab extends React.Component {
5
  // TODO util로 분류하기
6
  setSubState(key, state) {
7
    const newState = Object.assign({}, this.state[key], state);
8
    this.setState({ [key]: newState });
9
  }
10
11
  refresh() {
12
    // TODO refresh 코드도 공통화
13
    throw new Error('Should implement this method "refresh()"');
14
  }
15
}
16